<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <input id="totalCountNum" type="hidden" value="${userIntegralRules.size()}">
    <table class="table table-bordered">
        <thead>
        <tr >
            <th class="text-center">ID</th>
            <th class="text-center" width="30%">要求学员行为</th>
            <th class="text-center" width="15%">获取积分类型</th>
            <th class="text-center" width="10%">获取分数</th>
            <th class="text-center" width="20%">状态</th>
            <th class="text-center" width="20%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover ">
            <tbody id="tbodyIntegral">
            <tr class="jqgfirstrow" role="row">
                <td role="gridcell"><div class="table-first-id">&nbsp;</div></td>
                <td role="gridcell" width="30%"></td>
                <td role="gridcell" width="15%"></td>
                <td role="gridcell" width="10%"></td>
                <td role="gridcell" width="20%"></td>
                <td role="gridcell" width="20%"></td>
            </tr>

                <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="integral : ${dataMap['list']}" th:attr="data-id=${integral['id']}" th:attrappend="data-status=${integral['status']}" th:attrprepend="id=${integral['id']}">
                    <td class="text-center">
                        <span th:if="${integral['id']}==null or ${integral['id']}==''">—</span>
                        <span th:if="${integral['id']}!=null" th:text="${integral['id']}"></span>
                    </td>
                    <td class="text-center" >
                        <span th:if="${integral['action']}==null or ${integral['action']}==''">—</span>
                        <span th:if="${integral['action']}!=null" th:text="${integral['action']}"></span>
                    </td>
                    <td class="text-center" >
                        <span th:if="${integral['type']}==1">固定获取</span>
                        <span th:if="${integral['type']}==2" >比例获取</span>
                        <span th:if="${integral['type']}==3" >后台赠送</span>
                    </td>
                    <td class="text-center resetdWrap "  th:classappend="'userIntegralScore_'+${integral['id']}" >
                        <span th:if="${integral['type']}==1" th:text="${integral['score']}+'分数'"></span>
                        <span th:if="${integral['type']}==2" th:text="${integral['score']}+'%'"></span>
                        <span class="resetdBtn fs16 c-red" th:attr="data-id=${integral['id']},data-score=${integral['score']},data-type=${integral['type']}"   title="修改">
                            <i class="fa fa-pencil"></i>
                        </span>
                    </td>
                    <td class="text-center " th:classappend="'userIntegralRule_'+${integral['id']}">
                        <span th:if="${integral['status']}==1" class="label label-info">正常</span>
                        <span th:if="${integral['status']}==2" class="label label-danger">停用</span>
                    </td>
                    <td class="text-center" >
                        <a th:if="${integral['status']}==1" href="javascript:void (0);" class="c-master fs14 ml5 updateStatus"  th:attr="data-id=${integral['id']}" data-status="2" data-toggle="tooltip" data-placement="bottom" data-original-title="停用"><i class="fa fa-unlock-alt"></i></a>
                        <a th:if="${integral['status']}==2" href="javascript:void (0);" class="c-master fs14 ml5 updateStatus"   th:attr="data-id=${integral['id']}" data-status="1" data-toggle="tooltip" data-placement="bottom" data-original-title="恢复"><i class="fa fa-history"></i></a>
                        <!--<a href="javascript:void (0);" class="c-master fs14 ml5 updateStatus"  data-id="${userIntegralRule.id}" data-status="3" data-toggle="tooltip" data-placement="bottom" data-original-title="删除"><i class="fa fa-trash-o"></i></a>-->
                    </td>
                </tr>

                <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                    <td colspan="6" class="text-center">
                        <div class="noDataTipsBox">
                            <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<!-- 分页，开始 -->
<div data-th-replace="layout/adminPage"></div>
<!-- 分页，结束 -->